/*
 * jxController Project (2014)
 * 
 * by Denilson Edinaldo Pinto
 * 
 * LGPL
 * Copyright (C) 2014
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.jxController.event;

import org.jxDao.dao.filter.Filterable;
import org.jxDao.dao.filter.OrderBy;

/**
 * @author Denilson Edinaldo Pinto
 * @porject jxController
 * @package org.jxController.event
 * @date 06/05/2014 - 08:44:34
 */
public interface CrudEvent {
	
	/**
	 * @return true if the operation was performed
	 */
	boolean deleteAction();
	
	/**
	 * 
	 */
	void editAction();
	
	/**
	 * @param fetch
	 *        Example: {ObjA.class, ObjB.class, ObjC.class}
	 * @return true if a record has been selected
	 */
	boolean findAction(Class<?>... fetch);
	
	/**
	 * @param orderBy
	 * @param fetch
	 *        Example: {ObjA.class, ObjB.class, ObjC.class}
	 * @return true if a record has been selected
	 */
	boolean findAction(OrderBy orderBy, Class<?>... fetch);
	
	/**
	 * @param filter
	 * @param fetch
	 *        Example: {ObjA.class, ObjB.class, ObjC.class}
	 * @return true if a record has been selected
	 */
	boolean findAction(Filterable filter, Class<?>... fetch);
	
	/**
	 * 
	 */
	void newAction();
	
	/**
	 * 
	 */
	void printAction();
	
	/**
	 * @param fetch
	 *        Example: {ObjA.class, ObjB.class, ObjC.class}
	 */
	void printAction(Class<?>... fetch);
	
	/**
	 * @param orderBy
	 * @param fetch
	 *        Example: {ObjA.class, ObjB.class, ObjC.class}
	 */
	void printAction(OrderBy orderBy, Class<?>... fetch);
	
	/**
	 * @param filter
	 * @param fetch
	 *        Example: {ObjA.class, ObjB.class, ObjC.class}
	 */
	void printAction(Filterable filter, Class<?>... fetch);
	
	/**
	 * 
	 */
	void refreshAction();
	
	/**
	 * @param fetch
	 *        Example: {ObjA.class, ObjB.class, ObjC.class}
	 * @return true if the operation was performed
	 */
	boolean saveAction(Class<?>... fetch);
	
	/**
	 * 
	 */
	void undoAction();
}
